local hit_effects = require("__base__.prototypes.entity.hit-effects")
local sounds = require("__base__.prototypes.entity.sounds")

data:extend({
  {
    type = "recipe",
    name = "kr-superior-long-inserter",
    energy_required = 1,
    enabled = false,
    ingredients = {
      { type = "item", name = "kr-inserter-parts", amount = 2 },
      { type = "item", name = "kr-imersium-plate", amount = 2 },
      { type = "item", name = "kr-imersium-gear-wheel", amount = 4 },
      { type = "item", name = "stack-inserter", amount = 1 },
    },
    results = { { type = "item", name = "kr-superior-long-inserter", amount = 1 } },
  },
  {
    type = "item",
    name = "kr-superior-long-inserter",
    icon = "__Krastorio2Assets__/icons/entities/superior-long-inserter.png",
    subgroup = "inserter",
    order = "h2[superior-long-inserter]",
    place_result = "kr-superior-long-inserter",
    stack_size = 50,
    weight = 20*kg,
  },
  {
    type = "inserter",
    name = "kr-superior-long-inserter",
    icon = "__Krastorio2Assets__/icons/entities/superior-long-inserter.png",
    flags = { "placeable-neutral", "placeable-player", "player-creation" },
    minable = { mining_time = 0.1, result = "kr-superior-long-inserter" },
    fast_replaceable_group = "long-handed-inserter",
    collision_box = { { -0.15, -0.15 }, { 0.15, 0.15 } },
    selection_box = { { -0.4, -0.35 }, { 0.4, 0.45 } },
    pickup_position = { 0, -2 },
    insert_position = { 0, 2.2 },
    extension_speed = 0.105,
    rotation_speed = 0.06,
    stack_size_bonus = 4,
        bulk = true,
    grab_less_to_match_belt_stack = true,
    wait_for_full_hand = true,
    enter_drop_mode_if_held_stack_spoiled = true,
    max_belt_stack_size = 4,
    bulk = true,
    filter_count = 5,
    energy_per_movement = "48kJ",
    energy_per_rotation = "48kJ",
    energy_source = {
      type = "electric",
      usage_priority = "secondary-input",
      drain = "2kW",
    },
    vehicle_impact_sound = sounds.generic_impact,
    working_sound = sounds.inserter_fast,
    max_health = 200,
    heating_energy = "50kW",
    corpse = "kr-superior-inserter-remnants",
    damaged_trigger_effect = hit_effects.entity(),
    icon_draw_specification = { scale = 0.5 },
    resistances = {
      {
        type = "fire",
        percent = 90,
      },
    },
    hand_base_picture = {
      filename = "__Krastorio2Assets__/buildings/superior-inserter/superior-inserter-hand-base.png",
      priority = "extra-high",
      width = 32,
      height = 136,
      scale = 0.25,
    },
    hand_closed_picture = {
      filename = "__Krastorio2Assets__/buildings/superior-long-inserter/superior-long-inserter-hand-closed.png",
      priority = "extra-high",
      width = 100,
      height = 164,
      scale = 0.25,
    },
    hand_open_picture = {
      filename = "__Krastorio2Assets__/buildings/superior-long-inserter/superior-long-inserter-hand-open.png",
      priority = "extra-high",
      width = 130,
      height = 164,
      scale = 0.25,
    },
    hand_base_shadow = {
      filename = "__base__/graphics/entity/burner-inserter/burner-inserter-hand-base-shadow.png",
      priority = "extra-high",
      width = 32,
      height = 132,
      scale = 0.25,
    },
    hand_closed_shadow = {
      filename = "__Krastorio2Assets__/buildings/superior-inserter/superior-inserter-hand-closed-shadow.png",
      priority = "extra-high",
      width = 100,
      height = 164,
      scale = 0.25,
    },
    hand_open_shadow = {
      filename = "__Krastorio2Assets__/buildings/superior-inserter/superior-inserter-hand-open-shadow.png",
      priority = "extra-high",
      width = 130,
      height = 164,
      scale = 0.25,
    },
    platform_picture = {
      sheet = {
        filename = "__Krastorio2Assets__/buildings/superior-inserter/superior-inserter-platform.png",
        priority = "extra-high",
        width = 105,
        height = 79,
        shift = util.by_pixel(1.5, 7.5 - 1),
        scale = 0.5,
      },
    },
    circuit_connector = circuit_connector_definitions["inserter"],
    circuit_wire_max_distance = inserter_circuit_wire_max_distance,
    default_stack_control_input_signal = inserter_default_stack_control_input_signal,
  },
})
